<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="./audio.css" />
    <style>
      html,
      body {
        background: #fff;
      }

      .yAudio {
        width: 820px;
        margin: 10px auto;
      }

      .toLus {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
      }

      .toLus img {
        display: block;
        width: 40px;
        height: 40px;
      }

      .github {
        display: block;
        width: 100%;
        text-align: center;
      }
    </style>
  </head>

  <body>
    <div class="yAudio" id="yAudio1"></div>
    <div class="yAudio" id="yAudio2"></div>

    <script src="./audio.js"></script>
    <script>
      // 假如能回到过去，你想做什么id=1982066521
      // 桌面音乐收藏id=8169743797
      fetch(
        "https://api.i-meto.com/meting/api?server=netease&type=playlist&id=8169743797"
      ).then(async (response) => {
        const audio = await response.json();
        new YAudio({
          element: document.querySelector("#yAudio1"),
          audio: audio,
        });
      });
      // fetch('https://www.vvhan.com/usr/themes/Joe/NeteaseCloudMusicApi.php?id=28403111').then(async response => {
      //   const audio = await response.json();
      //   new YAudio({
      //     element: document.querySelector('#yAudio2'),
      //     audio: audio
      //   })
      // });
    </script>
  </body>
</html>
